home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 2 / csmp-v2-008.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  37.9 KB  |  956 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Thu, 04 Feb 93       Volume 2 : Issue 8
  2.  
  3. Today's Topics:
  4.  
  5.     PPC Sessions, or Any ports in this storm?
  6.     Gestalt Selectors in APPL
  7.     One binary for all Macs (even 128K)
  8.     Advice needed
  9.  
  10.  
  11.  
  12. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  13.  
  14. The digest is a collection of article threads from the internet newsgroup
  15. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  16. regularly and want an archive of the discussions.  If you don't know what a
  17. newsgroup is, you probably don't have access to it.  Ask your systems
  18. administrator(s) for details.  If you don't have access to news, there is
  19. no way that I know of for you to post articles to the group.
  20.  
  21. Each issue of the digest contains one or more sets of articles (called
  22. threads), with each set corresponding to a 'discussion' of a particular
  23. subject.  The articles are not edited; all articles included in this digest
  24. are in their original posted form (as received by our news server at
  25. cs.uoregon.edu).  Article threads are not added to the digest until the last
  26. article added to the thread is at least one month old (this is to ensure that
  27. the thread is dead before adding it to the digest).  Article threads that
  28. consist of only one message are generally not included in the digest.
  29.  
  30. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  31. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  32. file /pub/mac/csmp-digest/README before downloading any files.  The most
  33. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  34. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  35. archive has a mail server; send a message with the text '$MACarch help' (no
  36. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  37.  
  38. The digest is also available via email.  Just send a note saying that you
  39. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  40. automatically receive each new issue as it is created.  Sorry, back issues
  41. are not available through the mailing list.
  42.  
  43. Send administrative mail to mkelly@cs.uoregon.edu.
  44.  
  45.  
  46. -------------------------------------------------------
  47.  
  48. From: kempkec@mist.CS.ORST.EDU (Christopher Kempke)
  49. Subject: PPC Sessions, or Any ports in this storm?
  50. Date: 14 Dec 92 12:24:42 GMT
  51. Organization: Oregon State University, Computer Science Dept.
  52.  
  53.  
  54. First a simple question:  Can I assume that PPC Session reference numbers
  55. are unique to a running application?   This isn't explicitly stated, but
  56. I'm almost sure it's true.   Will my application crash and burn in system
  57. 11.3 if I rely on this now?
  58.  
  59. Here's the scoop on why I want to know.   I'm writing some code that uses
  60. (potentially) several PPCPorts.  However, these ports share a common
  61. completion routine for sends, as well as receives, informs, etc.
  62.  
  63. Now, in the completion routine I need to know what port the send or
  64. receive request originated from in order to know what to do with some
  65. statistics data about the transfer.  No problem, both PPCSEND and PPCRECEIVE
  66. include a userdata parameter for passing information to the completion 
  67. routines.
  68.  
  69.     BZZZZT.  Wrong answer, take another number and try again.  They
  70.     actually deliver the userdata to the OTHER process involved in the
  71.     transaction, where it does me no good at all.
  72.  
  73. Worse, the ReadParam and WriteParam (why the name change from send/receive
  74. to write/read, guys?) don't include the port reference number.  The
  75. only thing I can consistently get is the session reference number, and
  76. of course there's two big problems with that:  a) it's not documented to
  77. be unique, so I can't necessarily map it back to the port number, and
  78. b) there's no obvious way to convert them, short of building a table myself
  79. as I open the sessions, and c) the session reference number is not even
  80. listed as being a readable value in the completion procedure, so potentially
  81. in a later system it could be corrupted or overwritten by the time it reaches
  82. the completion routine.
  83.  
  84. Is there really no way to do this?   I _can't_ be the only person who
  85. needs to send data from the application to its own completion routines.
  86. Can I?
  87. I can't easily use global variables, because there are a (potentially)
  88. unlimited number of open ports and pending transactions.
  89.  
  90. This seems like something that people would need to be able to do fairly
  91. often; what am I missing?  (I'd be happy to look stupid just to get this
  92. code finished :-))
  93.     
  94.     --Chris
  95.  
  96. +++++++++++++++++++++++++++
  97.  
  98. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  99. Date: 16 Dec 92 04:21:27 GMT
  100. Organization: University of Waikato, Hamilton, New Zealand
  101.  
  102. In article <1ghueaINNnuf@flop.ENGR.ORST.EDU>, kempkec@mist.CS.ORST.EDU (Christopher Kempke) writes:
  103. >
  104. > First a simple question:  Can I assume that PPC Session reference numbers
  105. > are unique to a running application?
  106.  
  107. I think that session and port numbers are unique systemwide, not just to an
  108. application. I've been doing some messing about with PPC from HyperCard,
  109. and several times I've made some mistake in a script, tried quitting HyperCard
  110. and going back in, and failed to open my port because it was already open.
  111.  
  112. Remember the PPC Toolbox can be used from interrupt level and INIT code, not
  113. necessarily by an application. I don't think it knows anything about
  114. application contexts; that knowledge belongs to higher layers, like the
  115. High-Level Event and AppleEvent Managers.
  116.  
  117. > Worse, the ReadParam and WriteParam (why the name change from send/receive
  118. > to write/read, guys?) don't include the port reference number.  The
  119. > only thing I can consistently get is the session reference number, and
  120. > of course there's two big problems with that:  a) it's not documented to
  121. > be unique, so I can't necessarily map it back to the port number, and
  122. > b) there's no obvious way to convert them, short of building a table myself
  123. > as I open the sessions, and c) the session reference number is not even
  124. > listed as being a readable value in the completion procedure, so potentially
  125. > in a later system it could be corrupted or overwritten by the time it reaches
  126. > the completion routine.
  127.  
  128. I haven't heard of any cases where the system altered a field where there
  129. was only a right-arrow next to its description. I trust this is still true
  130. with the PPC Toolbox. (He said with a straight face.)
  131.  
  132. > Is there really no way to do this?   I _can't_ be the only person who
  133. > needs to send data from the application to its own completion routines.
  134. > Can I?
  135.  
  136. One common technique is to make the PPC parameter block part of a larger
  137. structure that you know about. You can put whatever information you like in
  138. the fields following it.
  139.  
  140. There's another technique I like to use (because it also works in more
  141. difficult situations), but it involves generating code at run-time, which
  142. upsets some squeamish types. :-)
  143.  
  144. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  145. Computer Services Dept                     fax: +64-7-838-4066
  146. University of Waikato            electric mail: ldo@waikato.ac.nz
  147. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  148.  
  149. ---------------------------
  150.  
  151. From: zobkiw@world.std.com (Joe Zobkiw)
  152. Subject: Gestalt Selectors in APPL
  153. Organization: The World Public Access UNIX, Brookline, MA
  154. Date: Wed, 23 Dec 1992 20:40:12 GMT
  155.  
  156. I need an application to install a gestalt selector. 
  157. I know I need to load it into the System Heap but I 
  158. have a few questions and comments.
  159.  
  160. 1) Can I perform a "6-byte-xdef" type trick on this 
  161. code? I'm not sure I can since even if I mark the 
  162. 6-byte resource as sysHeap the code it points to is 
  163. still in my application heap.
  164.  
  165. 2) If I place my Gestalt selector function in a separate 
  166. CODE resource, can I mark that resource as sysHeap and 
  167. have it work properly? This would be WITHOUT any 6-byte 
  168. tricks.
  169.  
  170. 3) How can I remove the Gestalt selector once the app 
  171. quits? Will
  172.  
  173.     err = ReplaceGestalt(selector, nil, &oldGestaltFunction);
  174.  
  175. work or will this cause the System to jump to location 0 
  176. the next time someone calls my selector?
  177.  
  178. What's the easiest way? Thanks in advance! :)
  179.  
  180. Joe Zobkiw
  181.  
  182. - -- 
  183. - -------------------------------------------------------------
  184. joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw
  185.  
  186. macintosh.midi.synthesis.c.oop.asm.communications.graphics...
  187.  
  188. +++++++++++++++++++++++++++
  189.  
  190. From: grobbins@Apple.COM (Grobbins)
  191. Date: 24 Dec 92 06:19:14 GMT
  192. Organization: Experimental System Software Investigations
  193.  
  194. In article <BzqC31.FAM@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  195. >1) Can I perform a "6-byte-xdef" type trick on this 
  196. >code? I'm not sure I can since even if I mark the 
  197. >6-byte resource as sysHeap the code it points to is 
  198. >still in my application heap.
  199.  
  200. It should work so long as the application is running, but since the
  201. application may quit and there is no way to remove a gestalt selector,
  202. you will need at least one totally stand-alone block of code.  So the
  203. 6-byte trick won't solve this problem.
  204.  
  205. (This limitation doesn't apply to things like time manager tasks; since
  206. they can be removed, it is appropriate to simply make the task code a
  207. function of the application, or to put an initial jump instruction in
  208. the system heap, and remove the task before the app quits.)
  209.  
  210. You can copy a function from the application into a block in the
  211. system heap.  If the function were called MySelectorFunction and
  212. it were followed by a procedure called NullProc, then this would
  213. work:
  214.  
  215.  mySelectorFunctionSize := Ord4(@NullProc) - Ord4(@MySelectorFunction);
  216.  { mySelectorFunctionSize should be something reasonable, definitely >0 }
  217.  
  218.  { make space in the system heap }
  219.  mySelectorFunctionPtr := NewPtrSys(mySelectorFunctionSize);
  220.  IF mySelectorFunctionPtr <> NIL THEN
  221.     BEGIN
  222.       { copy the function into the system heap }
  223.       BlockMove(@MySelectorFunction, mySelectorFunctionPtr, 
  224.                 mySelectorFunctionSize);
  225.       retCode := NewGestalt(kMySelector, mySelectorFunctionPtr);
  226.     END;
  227.  
  228. This is more fragile than just compiling a stand-alone code resource
  229. (on which you'd call set the SysHeap bit, call GetResource, DetachResource,
  230. HLock; see IM VI 3-43) since the BlockMove method makes the assumption
  231. that the functions in the compiled code are in the same relative order
  232. in memory as they are in the source file.  Check the compiler output
  233. with a disassembler (like ResEdit's code viewer) to make certain that
  234. functions are sequential as expected in the final application code.
  235.  
  236.  
  237. >2) If I place my Gestalt selector function in a separate 
  238. >CODE resource, can I mark that resource as sysHeap and 
  239. >have it work properly? This would be WITHOUT any 6-byte 
  240. >tricks.
  241.  
  242. Yep, that's the canonical way.  Be sure it's locked in memory before
  243. installation, too.
  244.  
  245. >3) How can I remove the Gestalt selector once the app 
  246. >quits? Will
  247. >    err = ReplaceGestalt(selector, nil, &oldGestaltFunction);
  248. >work or will this cause the System to jump to location 0 
  249. >the next time someone calls my selector?
  250. >What's the easiest way? Thanks in advance! :)
  251.  
  252. Rather than try to remove the selector, just make a simple replacement
  253. selector function that returns zero or something else distinct and
  254. strand it in the System heap.
  255.  
  256.  
  257. Grobbins              grobbins@apple.com
  258.  
  259. Usual disclaimers apply.
  260.  
  261. +++++++++++++++++++++++++++
  262.  
  263. From: radcliff@apple.com (Dave Radcliffe)
  264. Date: 31 Dec 92 22:30:51 GMT
  265. Organization: Apple Computer
  266.  
  267. In article <BzqC31.FAM@world.std.com>, zobkiw@world.std.com (Joe Zobkiw) writes:
  268. > I need an application to install a gestalt selector. 
  269. > I know I need to load it into the System Heap but I 
  270. > have a few questions and comments.
  271. > 1) Can I perform a "6-byte-xdef" type trick on this 
  272. > code? I'm not sure I can since even if I mark the 
  273. > 6-byte resource as sysHeap the code it points to is 
  274. > still in my application heap.
  275. > 2) If I place my Gestalt selector function in a separate 
  276. > CODE resource, can I mark that resource as sysHeap and 
  277. > have it work properly? This would be WITHOUT any 6-byte 
  278. > tricks.
  279. > 3) How can I remove the Gestalt selector once the app 
  280. > quits? Will
  281. >     err = ReplaceGestalt(selector, nil, &oldGestaltFunction);
  282. > work or will this cause the System to jump to location 0 
  283. > the next time someone calls my selector?
  284. > What's the easiest way? Thanks in advance! :)
  285. > Joe Zobkiw
  286.  
  287. There is glue code on the January Developer CD that, assuming all you want your 
  288. Gestalt function to do is return a value, solves all your problems.  It is
  289. called GestaltValue.  The ReadMe file is pasted below:
  290.  
  291. GestaltValue Read Me
  292. ) Copyright 1992 Apple Computer, Inc.
  293. All rights reserved
  294. - ------------------------------------
  295. This document describes the GestaltValue functionality as implemented in 
  296. GestaltValue.o.  Interfaces to GestaltValue are provided in 
  297. GestaltValue.h and GestaltValue.p.
  298.  
  299. GestaltValue is a set of routines, implemented as glue, that extend and 
  300. enhance existing Gestalt functionality.  For a complete description of 
  301. Gestalt, refer to Chapter 3 of Inside Macintosh VI. 
  302.  
  303. Rationale
  304.  
  305. Existing Gestalt functionality allows developers to put Gestalt to use in 
  306. their own applications by registering a Gestalt selector using the 
  307. NewGestalt or ReplaceGestalt calls, and providing a function which can 
  308. return the appropriate response.
  309.  
  310. While this is a powerful feature of Gestalt, in practice, it is difficult 
  311. to take advantage of for a number of reasons:
  312.  
  313. 1) The supplied function must entirely reside in the system heap.
  314.  
  315. 2) The function should be reentrant and not move memory because Gestalt 
  316. (and therefore the function) may be called at interrupt time.
  317.  
  318. 3) The function must effectively remain resident until restart.  This is 
  319. a problem for applications which may come and go multiple times.
  320.  
  321. 4) Since the purpose of the function is to return a response value, the 
  322. function must know how to locate, or otherwise manage that value.
  323.  
  324. All of this means a lot of work just to allow code to retrieve the response 
  325. value via Gestalt.
  326.  
  327. GestaltValue addresses all these issues.  It is built to deal with the most 
  328. common case, simply returning a 32-bit value.  It safely implements and 
  329. installs a single common, shared gestalt function and reports back values
  330. via the existing Gestalt mechanism.  This gestalt function gets installed 
  331. the first time the glue gets invoked.  Subsequent calls to the glue 
  332. (either from the same application, or a different one) cooperate with 
  333. the gestalt function to maintain a table of selectors and values for the 
  334. function to report.
  335.  
  336. GestaltValue will eventually be implemented as a standard system trap, in 
  337. which case, the glue will simply call the trap.  Although currently provided
  338. as a standalone object file, GestaltValue will eventually be rolled into 
  339. development libraries; watch for it in a development system near you.
  340.  
  341. All three GestaltValue functions defined below can move memory, so they 
  342. cannot be called at interrupt time.  But the shared gestalt function that 
  343. GestaltValue installs in the system heap is reentrant and does not move 
  344. memory (i.e., it satisfies criteria (2) above), so any values registered 
  345. via this mechanism can be safely retrieved at interrupt time via the 
  346. standard Gestalt mechanism.
  347.  
  348. Interface
  349.  
  350. Pascal:
  351.  
  352. FUNCTION NewGestaltValue(selector: OSType;newValue: LONGINT): OSErr;
  353. FUNCTION ReplaceGestaltValue(selector: OSType;replacementValue: LONGINT): OSErr;
  354. FUNCTION DeleteGestaltValue(selector: OSType): OSErr;
  355.  
  356. C:
  357.  
  358. pascal OSErr NewGestaltValue (OSType selector, long newValue);
  359. pascal OSErr ReplaceGestaltValue (OSType selector, long replacementValue);
  360. pascal OSErr DeleteGestaltValue (OSType selector);
  361.  
  362. NewGestaltValue and ReplaceGestaltValue are analogous to NewGestalt and 
  363. ReplaceGestalt.  They take a standard 4 character OSType value and a new
  364. or replacement value.  ReplaceGestaltValue has no parameter analogous 
  365. to the oldGestaltFunction parameter of ReplaceGestalt.  If you desire 
  366. saving the previous value, you should call Gestalt for that selector 
  367. before calling ReplaceGestaltValue.
  368.  
  369. The usual restrictions on the selector parameter still apply.  Apple 
  370. recommends you use your four-character creator sequence for your selector.  
  371. All lowercase letter and nonalphabetic ASCII sequences are reserved for Apple.
  372.  
  373. DeleteGestaltValue makes a Gestalt value unknown to Gestalt.  Subsequent
  374. calls to Gestalt for that selector will return gestaltUndefSelectorErr.
  375.  
  376. Return values
  377.  
  378. GestaltValue requires that the _Gestalt trap be implemented.  You will get 
  379. unimpErr (-4) if _Gestalt is unavailable.
  380.  
  381. NewGestaltValue returns gestaltDupSelectorErr (-5552) if you attempt to add 
  382. a new value for an existing selector.  You should use ReplaceGestaltValue 
  383. instead.
  384.  
  385. ReplaceGestaltValue returns gestaltUndefSelectorErr (-5551) if you attempt 
  386. to replace a non-existent selector.  You should use NewGestaltValue instead.
  387.  
  388. Both NewGestaltValue and ReplaceGestalt value may return memory errors if 
  389. they cannot allocate sufficient room in the system heap for their code and 
  390. data.
  391.  
  392. DeleteGestaltValue returns gestaltUndefSelectorErr if you attempt to delete 
  393. a selector unknown to GestaltValue (such as a pre-defined gestalt selector 
  394. such as 'fpu ').
  395. - ----
  396. I hope this helps.  Have fun,
  397.  
  398. Dave Radcliffe
  399. Apple Computer
  400. MacDTS
  401.  
  402. ---------------------------
  403.  
  404. From: art@leis.base.bellcore.com (A. Zysk)
  405. Subject: One binary for all Macs (even 128K)
  406. Date: 29 Dec 92 20:13:04 GMT
  407. Organization: ZEI Software
  408.  
  409. This is a two part question concerning the mant versions of
  410. MACS out there.  I've divided the questions into an ENGINEERING
  411. section and a MARKETING section.  Any response to any question
  412. is appreciated.
  413.  
  414.  
  415. ENGINEERING SECTION
  416. ===================
  417.  
  418. Is there anyone else out there who is trying to keep
  419. thier applications *absolutely* portable to ALL Macs
  420. including the Original 1984 128K Mac?
  421.  
  422. I am developing on higher powered Macs and cross testing on the
  423. 128K.
  424.  
  425. As a second phase, I plan to obtain or develop a library of tools
  426. that selectivly enable or disable certain features either available
  427. or not available on a particular Mac.
  428.  
  429. A good example is the pulldown menu.  On 128K Macs, you can only
  430. append a limited number of menu items to a pulldown menu.  This is because
  431. the auto scrolling feature is not available.
  432.  
  433. I know that producing such a library will be very painful, but I anticipate
  434. the results will be well worth it.  Do any comprehensive texts exist
  435. on this subject?
  436.  
  437. MARKETING SECTION
  438. =================
  439.  
  440. Given each type of Mac,
  441.  
  442.     How many units of each have been manufactured?
  443.  
  444.     By country, per type of MAC, how many units are still in use?
  445.  
  446.         What's the breakdown, in as much detail as possible, of
  447.     what they are being used for.
  448.  
  449. - - A. Zysk
  450.   ZEI Software
  451.   art@leis.base.bellcore.com
  452.  
  453. +++++++++++++++++++++++++++
  454.  
  455. Date: 29 Dec 92 23:49:25 GMT
  456. Organization: Royal Institute of Technology, Stockholm, Sweden
  457.  
  458. In <1992Dec29.201304.14795@walter.bellcore.com> art@leis.base.bellcore.com (A. Zysk) writes:
  459.  
  460. >This is a two part question concerning the mant versions of
  461. >MACS out there.  I've divided the questions into an ENGINEERING
  462. >section and a MARKETING section.  Any response to any question
  463. >is appreciated.
  464.  
  465. If you're a developer, a lot of info is available from Apple
  466. regarding your questinos.
  467.  
  468.  
  469. >Is there anyone else out there who is trying to keep
  470. >thier applications *absolutely* portable to ALL Macs
  471. >including the Original 1984 128K Mac?
  472.  
  473. Not me. Not Apple. Neither MPW nor Think C support the
  474. 64K ROM anymore. Also, the 68000 is fading out, but still
  475. hanging in there in the PowerBook 100s.
  476.  
  477. >I know that producing such a library will be very painful, but I anticipate
  478. >the results will be well worth it.  Do any comprehensive texts exist
  479. >on this subject?
  480.  
  481. Worth it? What's your market? The 128K I know of is a fish tank;
  482. the 128K sold less than, say, Quadras sell today I think (I don't
  483. have any figures)
  484.  
  485. There's just no point in supporting pre-plus pre-system-6
  486. machines today, and tomorrow that's gonna be pre-sys-7
  487. non-color machines.
  488.  
  489.  
  490. - -- 
  491.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  492.  
  493.  -- I don't fear death, it's dying that scares me.
  494.  
  495. +++++++++++++++++++++++++++
  496.  
  497. From: johnston@me.udel.edu (Bill Johnston)
  498. Date: 30 Dec 92 00:35:24 GMT
  499. Organization: University of Delaware
  500.  
  501. In article <1992Dec29.234925.4623@kth.se> d88-jwa@hemul.nada.kth.se (Jon Wdtte) writes:
  502. >In <1992Dec29.201304.14795@walter.bellcore.com> art@leis.base.bellcore.com (A. Zysk) writes:
  503. >
  504. >>This is a two part question concerning the mant versions of
  505. >>MACS out there.  I've divided the questions into an ENGINEERING
  506. >>section and a MARKETING section.  Any response to any question
  507. >>is appreciated.
  508. >
  509. >>Is there anyone else out there who is trying to keep
  510. >>thier applications *absolutely* portable to ALL Macs
  511. >>including the Original 1984 128K Mac?
  512.  
  513. The engineering side of the question is simple:  yes, it's still
  514. possible to come up with a single binary that runs on Mac 128 
  515. through Quadra 950 if one is willing to compromise on features.
  516.  
  517. Engineering compromises aside, the appropriate question for the
  518. marketing side is not how many 128K Macs were sold, or even how
  519. many are still in use.  I'd want to know how many of the owners
  520. of these machines are active software buyers, and I'd guess
  521. that the answer is "not very many".  If the owners of these 
  522. machines aren't interested enough in buying current software
  523. to buy hardware needed to run it, there isn't much point in
  524. spending effort to support them -- especially if it means 
  525. compromising the product delivered to more likely customers.
  526. - -- 
  527. - -- Bill Johnston (johnston@me.udel.edu)
  528. - -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  529.  
  530. +++++++++++++++++++++++++++
  531.  
  532. From: bcoleman@hayes.com (Bill Coleman)
  533. Date: 30 Dec 92 15:22:56 GMT
  534. Organization: Hayes Microcomputer Products, Norcross, GA
  535.  
  536. In article <1992Dec29.201304.14795@walter.bellcore.com>, art@leis.base.bellcore.com (A. Zysk) writes:
  537. > ENGINEERING SECTION
  538. > ===================
  539. > Is there anyone else out there who is trying to keep
  540. > thier applications *absolutely* portable to ALL Macs
  541. > including the Original 1984 128K Mac?
  542.  
  543. Well, we kept Smartcom II running on 128K Macs for a while. About 5 years
  544. ago, we abandoned support for 128K Macs. We still kept support for 512K
  545. Macs, though. About 2 years ago, we pulled out support for the 512K Mac.
  546. We may still support the Mac XL (Lisa), but we haven't tested it.
  547.  
  548. I would suggest that you don't put yourself out to support the 128K Mac.
  549.  
  550. Apple estimated (3 years ago) that there are less than 50,000 128K / 512K
  551. Macs out there. (Most had been upgraded to a Plus) Of these, by now many
  552. have been put out of service. Of those still in use, few of these users are
  553. buying new applications.
  554.  
  555. So, if your application happens to run on a 128K or 512K Mac, fine. If not,
  556. I wouldn't sweat it. Unless you have specific clients that need support for
  557. these Macs, It isn't worth it. You're better off spending your efforts 
  558. in supporting the features of the newer system software.
  559.  
  560. - -- 
  561. Bill Coleman, AA4LR                ! CIS: 76067,2327    AppleLink: D1958
  562. Principal Software Engineer        ! Packet Radio: AA4LR @ W4QO
  563. Hayes Microcomputer Products, Inc. ! UUCP: uunet!hayes!bcoleman
  564. POB 105203 Atlanta, GA 30348 USA   ! Internet: bcoleman%hayes@uunet.uu.net
  565. Disclaimer: "My employer doesn't pay me to have opinions."
  566. Quote: "The same light shines on vineyards that makes deserts." -Steve Hackett.
  567.  
  568. +++++++++++++++++++++++++++
  569.  
  570. From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
  571. Date: 3 Jan 93 19:30:01 GMT
  572. Organization: University of Illinois at Urbana
  573.  
  574. The 128 and 512k are not worth supporting. As someone who actually wrote 
  575. programs for them I am saddened in saying that, but the simple fact is that the
  576. total number of pre-plus Macs sold was small, and since there were Apple 
  577. upgrades available to Plus status, 3rd-party upgrades to Plus status, and some
  578. really hazardously shoddy power supplies, ther are not too many of them left 
  579. out there. 
  580.  
  581. I have seen twice in my 8-year history using the Mac a citation of exponential
  582. sales growth. The first was with the Plus, then with the price cut of '90. Both
  583. time the Mac press ended up drooling about Apple having sold as many units in a
  584. year as in all previous years. (I'm being vague because I can't remember the 
  585. exact citations, but remember reading such stories)  Given that a used Plus is
  586. a $300 investment, the pre-Plus market is by nature a cheapskate market. That 
  587. makes it real tough to actually sell anything to them, and if you try to make 
  588. software that can work on ANY Mac you will have to count on selling to people 
  589. with modern macs and maybe having some 2nd-hand sales to people with old Macs.
  590. On the other hand, if you restrict yourself to using only that information in 
  591. Inside Mac vI-vIII, and add harmless things like vers and SIZE resources for 
  592. later Macs to use, it is a SIMPLE project. The only trouble is that you will 
  593. have some pretty austere programs. 
  594.  
  595. ---------------------------
  596.  
  597. From: hd12@ellis.uchicago.edu ()
  598. Subject: Advice needed
  599. Organization: computing
  600. Date: Sun, 13 Dec 1992 06:29:36 GMT
  601.  
  602. A software company is trying to buy an application I wrote for Macintosh.
  603. Since I don't have this kind of experience before, I would appreciate if 
  604. experienced people on the net can give me some good advice:
  605.  
  606. 1. Usually what's the percentage the software author can get from the 
  607. company's profit? Any estimation in terms of dollar? (assuming say, $70
  608. each copy.)
  609.  
  610. 2. If the company offer fixed percentage of their profit, how am I supposed
  611. to make sure they will keep their promise, since I don't have access to
  612. their balance sheet?
  613.  
  614. 3. Do I need a lawyer to make it legally binding?
  615.  
  616. 4. Any tips? Precautions? Suggestions?
  617.  
  618. All helps and suggestions will be very appreciated.
  619.  
  620.  
  621.  
  622. +++++++++++++++++++++++++++
  623.  
  624. From: werner@dewey.soe.berkeley.edu (John Werner)
  625. Date: 13 Dec 92 08:30:37 GMT
  626. Organization: School of Education, U.C. Berkeley
  627.  
  628. In article <1992Dec13.062936.26772@midway.uchicago.edu> hd12@midway.uchicago.edu writes:
  629.  
  630. >1. Usually what's the percentage the software author can get from the 
  631. >company's profit? Any estimation in terms of dollar? (assuming say, $70
  632. >each copy.)
  633.  
  634. Don't agree to a percentage of the "profit", whatever that means.  Ask
  635. for a percentge of the gross, i.e. you get a percentage of every
  636. dollar of revenue they get on your program, regardless of their
  637. expenses to produce it.  This way you don't have to worry quite as
  638. much about them fudging their costs to make the profit look lower.  On
  639. one educational program I wrote, I and the other authors get 15% of
  640. the gross.  We also got a decent advance.  In hindsight, we might have
  641. been able to get more.
  642.  
  643. >2. If the company offer fixed percentage of their profit, how am I supposed
  644. >to make sure they will keep their promise, since I don't have access to
  645. >their balance sheet?
  646.  
  647. See #1.  If you get a cut of the revenues instead of the profits, you
  648. just need to see the sales reports, not the balance sheet.  The
  649. contract should say that you get to see some sort of sales report, and
  650. should say how often.  I think we get one every 6 months.
  651.  
  652. >3. Do I need a lawyer to make it legally binding?
  653.  
  654. You need a good, tightly-worded contract to make it legally binding.
  655. Unfortunately, you this usually means you need a lawyer.  On the
  656. program I wrote, we negotiated our own contract, starting with the
  657. pre-canned one the publisher tried to get us to sign and combined with
  658. lots of advice from our lawyer.  We had him look over a few drafts and
  659. the final contract before we signed it.  I think we ended up paying
  660. him about $500.  This was in Chicago; I can probably find his
  661. name/number if you want them.
  662.  
  663. >4. Any tips? Precautions? Suggestions?
  664.  
  665. Make sure you have a valid, registered copyright on the program.
  666. Don't just put a copyright on it, send in the forms to the copyright
  667. office too.
  668.  
  669. Try to have the contract say that you retain copyright in the program;
  670. it gives you more control and rights, and a better legal position if
  671. you ever end up in court.  If they insist on getting the copyright, be
  672. aware that you're giving something up, and try to get something from
  673. them in return.
  674.  
  675. Depending on how commercial the program is, you might want to try to
  676. get some sort of promise that they will put a certain amount of effort
  677. into marketing/advertising or the rights revert to you.  This would be
  678. hard to get, but might be something to negotiate away.
  679. - -- 
  680. John Werner                        werner@soe.berkeley.edu
  681. UC Berkeley School of Education    510-642-9651
  682.  
  683. +++++++++++++++++++++++++++
  684.  
  685. From: oster@well.sf.ca.us (David Phillip Oster)
  686. Date: 14 Dec 92 08:39:07 GMT
  687. Organization: Whole Earth 'Lectronic Link
  688.  
  689. In article <1992Dec13.062936.26772@midway.uchicago.edu> hd12@midway.uchicago.edu writes:
  690. >A software company is trying to buy an application I wrote for Macintosh.
  691. >Since I don't have this kind of experience before, I would appreciate if 
  692. >experienced people on the net can give me some good advice:
  693.  
  694. >1. Usually what's the percentage the software author can get from the 
  695. >company's profit? Any estimation in terms of dollar? (assuming say, $70
  696. >each copy.)
  697. Whatever you can negotiate. IIt has been reported in the trade press that
  698. the author of the Atari version of Frogger made $0.75Million. It has been
  699. reported that Randy Wigginton got $1. for each copy of MacWrite given away
  700. with new macintoshes for the first 1 million macs. (Not bad for 6 months 
  701. work.)
  702.  
  703. >2. If the company offer fixed percentage of their profit, how am I supposed
  704. >to make sure they will keep their promise, since I don't have access to
  705. >their balance sheet?
  706. Many contracts specify that you get periodic access to their balance sheets,
  707. say once a year. What does "profit" mean here? Are their own salaries
  708. included? Do they subcontract production of the boxes to a production
  709. house that is, say, owned by a parent of the publisher, so the cost of
  710. production always equals income, (i.e, the "profit" is siphoned out of
  711. the publisher to the printer, leaving you with a piece of nothing.)?
  712. It has been reported that movie studios do this trick a lot.
  713.  
  714. >3. Do I need a lawyer to make it legally binding?
  715. No, a contract does not _require_ a lawyer to be legally binding, but a
  716. lawyer is trained to point out spots that another lawyer can use to cause
  717. you trouble. (This process of "sticking an oar in" itself causes trouble
  718. and slows the negotiations down.)  See the next point.
  719.  
  720. >4. Any tips? Precautions? Suggestions?
  721. No Lo press, Parker St., Berkeley CA, publishes a number of good self help
  722. books on selling software, including selling to a publisher for royalties.
  723. Get them. Read them.
  724.  
  725. "Getting to yes" and its sequels are good books on the art of negotiation,
  726. and there are many good books on how to sell. In the real world, what you
  727. get is what you get and everything is negotiable, although other parties
  728. often point to a printed sheet of rules as a means of making you think you
  729. can't negotiate.
  730. Remember that you can always hire a trained negotiator, but the better he
  731. is, the better he will be at negotiating his deal with _you_, so there is
  732. a point of diminishing returns.
  733.  
  734. Remember subsidiary rights, like what happens if the publisher wants a
  735. version on another computer.
  736.  
  737. Think of it as you hiring a "publisher" to produce, distribute, and
  738. market your work. How much is that worth?
  739.  
  740. I've been doing this for a living, but I sure don't know it all.
  741. Anyone else have advice?
  742.  
  743. +++++++++++++++++++++++++++
  744.  
  745. From: gaillard@panix.com (Ed Gaillard)
  746. Date: 14 Dec 92 00:44:17 GMT
  747. Organization: PANIX Public Access Unix, NYC
  748.  
  749. In <1992Dec13.062936.26772@midway.uchicago.edu>
  750. hd12@ellis.uchicago.edu (A Man With No Name) writes:
  751.  
  752. >A software company is trying to buy an application I wrote for Macintosh.
  753. >Since I don't have this kind of experience before, I would appreciate if 
  754. >experienced people on the net can give me some good advice:
  755.  
  756. [...]
  757.  
  758. >2. If the company offer fixed percentage of their profit, how am I supposed
  759. >to make sure they will keep their promise, since I don't have access to
  760. >their balance sheet?
  761.  
  762. Your contract should specify how this is to be audited.  BTW, if you
  763. agree to a fixed royalty per copy (or a percentage of the sales,
  764. rather than the profit), you will still have the problem of
  765. verifying the sales figures and pricing.
  766.  
  767. >3. Do I need a lawyer to make it legally binding?
  768.  
  769. Oh, yes.  Definitely.  You _need_ a lawyer.  A little time and money
  770. spect on a lawyer up-front, while negotiating your contract, will save
  771. you a _lot_ of unpleasantness later.
  772.  
  773. >4. Any tips? Precautions? Suggestions?
  774.  
  775. One thing to be careful of is, if your program controls special
  776. hardware that this company makes or sells, you must be protected from
  777. their selling the harware and _giving away_ your program.
  778.  
  779. >All helps and suggestions will be very appreciated.
  780.  
  781. Disclaimer:  I'm _not_ a lawyer, just someone who has had a bad
  782. experience with this kind of thing.  Get a lawyer, most preferably one
  783. with experience in software royalty agreements.
  784.  
  785. - -- 
  786. Ed Gaillard <gaillard@panix.com> 
  787. I can't see the lines I used to think I could read between.
  788.  
  789. +++++++++++++++++++++++++++
  790.  
  791. From: kdlee@umn-cs.cs.umn.edu (Kevin D. Lee)
  792. Date: 14 Dec 92 14:32:32 GMT
  793. Organization: University of Minnesota, Minneapolis, CSci dept.
  794.  
  795. In article <1992Dec13.062936.26772@midway.uchicago.edu> hd12@midway.uchicago.edu writes:
  796. >A software company is trying to buy an application I wrote for Macintosh.
  797.  
  798.     Don't sell the copyright, just sell the marketing rights in return
  799.     for a percentage of sales.  One way to protect yourself is to require
  800.     a yearly performance figure, if the software sales don't reach the
  801.     minumum sales figure (i.e. generate enough roylaties) then at your 
  802.     option, all rights revert to you.
  803.  
  804.  
  805. >
  806. >1. Usually what's the percentage the software author can get from the 
  807. >company's profit? Any estimation in terms of dollar? (assuming say, $70
  808. >each copy.)
  809.     10-20% seems to be the norm for roylaties.  Make sure that the 
  810.     royalty is on net sales.  By the way, roylaties are nice because
  811.     you do not have to pay social security on roylaties.
  812.  
  813. >
  814. >2. If the company offer fixed percentage of their profit, how am I supposed
  815. >to make sure they will keep their promise, since I don't have access to
  816. >their balance sheet?
  817.     In you contract insist on the right to audit the books. They
  818.     may require that it be done by a CPA.  Also insist that if 
  819.     the audit shows they made an error they pay for the audit.
  820.  
  821. B
  822. >
  823. >3. Do I need a lawyer to make it legally binding?
  824.     No, but you may feel more comfortable if you have a lawyer.
  825.     Try to do as musch of the negotiating yourself and just 
  826.     use the lawyer as a refrence.
  827.  
  828. B
  829. >
  830. >4. Any tips? Precautions? Suggestions?
  831.     There are several books published about negotiating your
  832.     own book contracts.  There are enough similarities that
  833.     it is worth your while to look at them.
  834.     Good Luck!
  835. >
  836. >All helps and suggestions will be very appreciated.
  837. >
  838. >
  839.  
  840. +++++++++++++++++++++++++++
  841.  
  842. From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
  843. Date: 14 Dec 92 16:23:29 GMT
  844. Organization: Royal Institute of Technology, Stockholm, Sweden
  845.  
  846. In <1992Dec14.004417.22727@panix.com> gaillard@panix.com (Ed Gaillard) writes:
  847.  
  848. >>2. If the company offer fixed percentage of their profit, how am I supposed
  849. >>to make sure they will keep their promise, since I don't have access to
  850. >>their balance sheet?
  851.  
  852. >Your contract should specify how this is to be audited.  BTW, if you
  853. >agree to a fixed royalty per copy (or a percentage of the sales,
  854. >rather than the profit), you will still have the problem of
  855. >verifying the sales figures and pricing.
  856.  
  857. Let the contract specify that you DO have access to their
  858. bookkeeping. You have the program, right?
  859.  
  860. >>3. Do I need a lawyer to make it legally binding?
  861.  
  862. >Oh, yes.  Definitely.  You _need_ a lawyer.  A little time and money
  863.  
  864. And a standard contract shouldn't take more than say 10 hours
  865. for an experienced lawyer. Add the cost of the contract as a
  866. lump sum for the program. (If they don't want to pay, they
  867. shouldn't have the program)
  868.  
  869. >>4. Any tips? Precautions? Suggestions?
  870.  
  871. Yes. Don't go for a percentage, go for a fixed rate. Say $3
  872. or whatever per sold copy (plus the cost of a good contract
  873. initially, of course) Better yet, figure out how much time
  874. you have spent on the program, multiply by your hourly rate
  875. (say $50 for a cheap programmer, $100 for a decent one) and
  876. just seel off the source. If they want support, they pay for
  877. it later.
  878.  
  879. That goes even if you sell it per copy; if they want support
  880. or changes, THEY PAY BY THE HOUR. Be a little tough; either
  881. they want the program and you should be rewarded, or the
  882. program is insignificant, and then you didn't lose much anyway.
  883.  
  884. Oh, and be sure to make the contract say THEY assume full responsibility
  885. for any demands or suits caused by them selling the program. You
  886. just hand them the code (or duplicated disks, in case of a per-copy
  887. system) and make no warranty.
  888.  
  889. Of course, I'm no lawyer, just a software designer who fortunately
  890. consulted with a (good) lawyer before signing anything.
  891.  
  892. Cheers,
  893.  
  894.                         / h+
  895.  
  896. - -- 
  897.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  898.  
  899.    This article printed on 100% recycled electrons.
  900.  
  901. +++++++++++++++++++++++++++
  902.  
  903. From: gaillard@panix.com (Ed Gaillard)
  904. Date: 16 Dec 92 03:54:20 GMT
  905. Organization: PANIX Public Access Unix, NYC
  906.  
  907. In reply to my post, I received an Email from Sean J. Crist
  908. <kurisuto@chopin.udel.edu>, which follows:
  909.  
  910. <begin forwarded mail>
  911.  
  912. >>3. Do I need a lawyer to make it legally binding?
  913. >
  914. >Oh, yes.  Definitely.  You _need_ a lawyer.  A little time and money
  915. >spect on a lawyer up-front, while negotiating your contract, will save
  916. >you a _lot_ of unpleasantness later.
  917.  
  918. I've tried posting this but for some reason the server keeps rejecting it.
  919. So I'll just mail it to you; I'd like it if you could post it, since I
  920. don't seem to be able.
  921.  
  922. An important point of clarification:  A contract is legally binding as
  923. soon as it's signed, regardless of whether an attorney was consulted. 
  924. What an attorney can do is point out parts of the contract which aren't
  925. legally enforceable, or parts which might have legal ramifications which
  926. you might not have anticipated.  A contract scribbled on a cocktail napkin
  927. is binding, as long as all parties have signed it.
  928.  
  929. So, do you need an attorney to make a contract legally binding?  No.  Is
  930. it a good idea to consult an attorney anyway?  Yes.
  931.  
  932. <end fowarded mail>
  933.  
  934. Mr. Crist is absolutely right.  I'm sorry for any confusion I might have
  935. caused.  I saw "do I need a lawyer" and went off half-cocked.  I meant
  936. "don't sign anything until you get a lawyer!"
  937.  
  938. - -- 
  939. Ed Gaillard <gaillard@panix.com> 
  940. I can't see the lines I used to think I could read between.
  941.  
  942. ---------------------------
  943.  
  944. End of C.S.M.P. Digest
  945. **********************
  946.